home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / C⁄C++ / picture / dynamic.h < prev    next >
Text File  |  1993-09-23  |  937b  |  44 lines

  1. //    Copyright 1993 Ralph Gonzalez
  2.  
  3. /*
  4. *    FILE:        dynamic.h
  5. *    AUTHOR:        R. Gonzalez
  6. *    CREATED:    November 25, 1991
  7. *
  8. *    Defines dynamic nested segment, following rules of physics.
  9. */
  10.  
  11. # ifndef    dynamic_h
  12. # define    dynamic_h
  13.  
  14. # include    "animate.h"
  15. # include    "trans.h"
  16. # include    "coord.h"
  17.  
  18. /******************************************************************
  19. *   Animated segment affected by physics.
  20. ******************************************************************/
  21. class    Dynamic_Segment:public Animated_Segment
  22. {
  23. protected:
  24.     Coord3            *center;
  25.     
  26. public:
  27.     double            ax,
  28.                     ay,
  29.                     az,
  30.                     vx,
  31.                     vy,
  32.                     vz;
  33.                     
  34.     Dynamic_Segment(void);
  35.     virtual void    set_acceleration(double,double,double);
  36.     virtual void    set_velocity(double,double,double);    
  37.     virtual void    set_center(double,double,double);
  38.     virtual void    simulate(double);
  39.     virtual double    get_center_y(void);
  40.     virtual void    move(Transformation*);
  41.     virtual            ~Dynamic_Segment(void);
  42. };
  43.  
  44. # endif